package com.api.syh56.shengyunhui.entity;


import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.ColumnComment;
import com.gitee.sunchenbin.mybatis.actable.annotation.DefaultValue;
import lombok.AccessLevel;
import lombok.Data;
import lombok.experimental.FieldDefaults;

import java.time.LocalDateTime;

@Data
@FieldDefaults(level = AccessLevel.PRIVATE)
@TableName("tmp_address")
public class TmpAddress {
    @Column(name = "id",isKey = true,isAutoIncrement = true,comment = "地址id")
    Long id;

    @Column(name = "contact_name") // 联系人姓名
    @ColumnComment("联系人姓名")
    private String contactName;

    @Column(name = "telephone") // 联系人电话
    @ColumnComment("联系人电话")
    private String telephone;

    @Column(name = "province",comment = "省")
    private String province;

    @Column(name = "city",comment = "市")
    private String city;

    @Column(name = "district",comment = "区")
    private String district;

    @Column(name = "address",comment = "详细地址")
    private String address;

    /**
     * 市级区域编码
     */
    @Column(name = "ad_code",comment = "市级区域编码")
    private Long adCode;

    @Column(name = "uid",comment = "用户表id（用于指向用户id）")
    private Long uid;

    @Column(name = "address_location",comment = "地址经纬度")
    private String addressLocation;

    @TableField(fill = FieldFill.INSERT)
    @Column(name = "creation_time") // 创建时间
    private LocalDateTime creationTime;

    @Column(name = "last_modification_time") // 最后修改时间
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime lastModificationTime;

    @TableLogic
    @Column(name = "is_deleted")
    @DefaultValue("false")
    private Boolean isDeleted;
}
